package main

import "fmt"

func main() {
	m := map[string]string {
		"name":"ccmourse",
		"course":"golang",
		"site":"imooc",
	}

	fmt.Println(m)

	fmt.Println("Traversing map")
	for k, v := range m {
		fmt.Println(k, v)
	}

	fmt.Println("Getting values")
	courseName, ok := m["course"]
	fmt.Println(courseName, ok)

	couseName, ok := m["couse"]
	fmt.Println(couseName, ok)

	fmt.Println("Deleting values")
	if name, ok := m["name"]; ok {
		delete(m, name)
	}

	fmt.Println(m)
}
